<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if (sizeof($pages)>0) {
	echo "<ul>";
	foreach ($pages as $page) {
		echo "<li>";
			echo "<a href='/".$url."/".$page['page_id']."/'>".$page['page_title']."</a>";
			echo "<div>";
				echo mb_substr(htmlspecialchars(strip_tags($page['page_text'],"img")), 0, 300)."...";
				echo "<br class='cc' />";
				echo "<a class='fr' href='/".$url."/".$page['page_id']."/'>Читать дальше...</a>";
				echo "<br class='cc' />";
			echo "</div>";
			if (is_array($page['childs'])) {
				$data['pages'] = $page['childs'];
				$this->load->view('modules/articles/index', $data);
			}
		echo "</li>";
	}
	echo "</ul>";
} else {
	showmenotice('Статей не найдено');
}
?>